package com.cjst.service.impl.sys;

import java.io.Serializable;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.cjst.dao.mapper.sys.FileInfoMapper;
import com.cjst.pojo.sys.FileInfo;
import com.cjst.service.impl.base.BaseServiceImpl;
import com.cjst.service.sys.FileInfoService;
import com.cjst.sql.C;
import com.cjst.sql.Method;
import com.cjst.sql.WherePrams;

@Service
public class FileInfoServiceImpl extends BaseServiceImpl<FileInfo, String> implements FileInfoService{
	@Autowired
	private FileInfoMapper fileInfoMapper;
	
	@Override
	public List<FileInfo> getFileInfo(Integer type){
		WherePrams where=Method.where("isdelete", C.EQ, 0);
		
		//根据remark排序，调整显示顺序
		where.orderBy(" remark asc ");
		if(type!=null){
			where.and("type", C.EQ, type);
		}
		return this.list(where);
	}


	@Override
	public void updateList(String id,List<String> imgs) {
		// TODO Auto-generated method stub
		
		fileInfoMapper.updateList(id,imgs);
	}
}
